As data processing tasks increase in complexity, it is becoming more common for data processing systems to include more than one processing unit to handle the performance of these tasks. In particular, in addition to main processing logic, for example a central processing unit (CPU), it is often the case that a number of additional pieces of special purpose hardware logic are provided for performing particular tasks. Examples of such additional hardware units, or subsidiary processing units as they are also referred to herein, are data accelerators such as those used to perform certain video processing functions, Direct Memory Access (DMA) controllers, Liquid Crystal Display (LCD) controllers, etc.
When the main processing unit delegates a particular task to one of the subsidiary processing units, it will typically be necessary for the main processing unit to determine when that task has been completed by the subsidiary processing unit. One known way to achieve this is to arrange the subsidiary processing unit to set a flag when it has completed the task, and for the main processing unit to be arranged to periodically poll that flag in order to determine whether the flag has been set, and accordingly determine whether the task has been completed. The flag will continue to be polled periodically in a polling loop until it is determined that the flag has been set.
There are a number of problems with such an approach. Firstly, dependent on the time taken for the subsidiary processing logic to perform the task, it will be appreciated that the main processing logic may need to poll the flag a significant number of times. In a system where low power consumption is desirable, this repeated polling of the flag is undesirable because energy is being consumed to no useful effect. Furthermore, it is often the case that the piece of memory in which the flags are maintained is accessible via a common bus interconnecting the main processing unit, subsidiary processing unit(s) and memory. Each time the main processing unit wishes to poll the flag, it needs to request access to the bus, and this hence increases the likelihood of contention arising between the various processing units seeking access to the bus.
Accordingly, it would be desirable to provide an improved technique for managing such polling loops.